#ifndef __UTHREAD_H__
#define __UTHREAD_H__

#include <global/header/types.h>

int uthread_init(void);

proc_t uthread_create(const char *name,
					  uint32_t level, uint32_t kstack_size, uintptr_t vpt,
					  uintptr_t entry, uintptr_t upriv, uintptr_t ustack_top,
					  unsigned int msg_buf_capacity);

proc_event_t uevent_get(uint32_t ue);
proc_event_t uevent_find(uint32_t ue);

void uthread_trapframe_switch_back_hook(struct trapframe_s *tf);
void uthread_syscall_switch_back_hook(uint32_t _unused, uint32_t sys_ret);
int  uthread_kmsg_enqueue(uint32_t msg);

#endif
